<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script type="text/javascript">
			document.write('<script src="../../js/fix.js?rd=?rd=' + Math.random() + '"><\/script>');
		</script>
		<script type="text/javascript">
			link(['../../css/reset.css', '../../fonts/iconfont/iconfont.css']);
		</script>
		<script>
			script();
	</script>
		<style type="text/css">
			.newscontent {
				overflow: hidden;
				line-height: 0.18rem;
				text-overflow: ellipsis;

				display: -webkit-box;

				-webkit-box-orient: vertical;
				white-space: normal;
				-webkit-line-clamp: 2;
			}

			.list_box p {
				font-size: 0.12rem;
				line-height: 0.16rem;
				text-align: right;
				padding-right: 0.1rem;
			}

			#sliderSegmentedControl {
				background: #fff;
				padding: 0.1rem 0px;
				height: 0.85rem;
			}

			.mui-control-item span {
				color: #47BAFE;
				font-size: 0.28rem !important;
				height: 0.3rem;
				display: block;
			}

			.topclass .mui-active span {
				color: #3385ff !important;
			}

			.topclass .mui-active {
				color: 3385ff !important;
			}

			.topclass .mui-control-item {
				color: #999999;
				font-size: 0.14rem;

			}

			html,
			body {
				background-color: #EEEEEE;
			}

			.mui-bar-nav~.mui-content .mui-pull-top-pocket {
				top: 1.25rem !important;
			}

			header {
				background: #47BAFE;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">资讯分享</h1>
		</header>
		<div class="mui-content">
			<div class="copy_edit">编辑网址</div>
			<div id="slider" class="mui-slider mui-fullscreen">

				<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<div class="mui-scroll topclass">
						<a class="mui-control-item mui-active" href="#item1mobile" data-wid="tab-top-subpage-1.html">
							<span class="iconfont iconredian"></span>
							热点
						</a>
						<a class="mui-control-item" href="#item2mobile" data-wid="tab-top-subpage-2.html">
							<span class="iconfont iconjiankang"></span>

							健康
						</a>
						<a class="mui-control-item" href="#item3mobile" data-wid="tab-top-subpage-3.html">
							<span class="iconfont iconbaoxian"></span>

							保险
						</a>
						<a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">
							<span class="iconfont iconjiaren"></span>

							家庭
						</a>
						<a class="mui-control-item" href="#item5mobile" data-wid="tab-top-subpage-5.html">
							<span class="iconfont iconjieri"></span>

							节日
						</a>
						<a class="mui-control-item" href="#item6mobile" data-wid="tab-top-subpage-6.html">
							<span class="iconfont iconmingren"></span>
							名人
						</a>

					</div>
				</div>

			</div>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/app/H5plus.js"></script>
		<script src="../../js/webviewGroup.js" type="text/javascript" charset="utf-8"></script>
		<script>
			mui.init();
			var ws = null,
				wc = null;
			mui.plusReady(function() {
				
				// 用户点击后
				// ws.addEventListener('maskClick', function() {
				// 	wc.close('auto');
				// }, false);

				var _self = plus.webview.currentWebview();
				var group = new webviewGroup(_self.id, {
					items: [{
							id: "tab-top-subpage-1.html",
							url: "tab-top-subpage-1.html",
							extras: {}
						}, {
							id: "tab-top-subpage-2.html",
							url: "tab-top-subpage-2.html",
							extras: {}
						}, {
							id: "tab-top-subpage-3.html",
							url: "tab-top-subpage-3.html",
							extras: {}
						}, {
							id: "tab-top-subpage-4.html",
							url: "tab-top-subpage-4.html",
							extras: {}
						}, {
							id: "tab-top-subpage-5.html",
							url: "tab-top-subpage-5.html",
							extras: {}
						},
						{
							id: "tab-top-subpage-6.html",
							url: "tab-top-subpage-6.html",
							extras: {}
						}
					],
					onChange: function(obj) {
						var c = document.querySelector(".mui-control-item.mui-active");
						if (c) {
							c.classList.remove("mui-active");
						}
						var target = document.querySelector(".mui-scroll .mui-control-item:nth-child(" + (parseInt(obj.index) + 1) +
							")");
						target.classList.add("mui-active");
						if (target.scrollIntoView) {
							target.scrollIntoView();
						}
					}
				});
				mui(".mui-scroll").on("tap", ".mui-control-item", function(e) {
					var wid = this.getAttribute("data-wid");
					group.switchTab(wid);
				});

				
					// var dsq = setInterval(function() {
					// 	let isCopy = localStorage.getItem("isCopy");
					// let copy_text = copyToClip();
					// 	if (copy_text != "" && copy_text != isCopy && copy_text.indexOf("https://mp.weixin.qq.com/") >= 0) {
					// 		showSide(copy_text);
					// 		localStorage.setItem("isCopy", copy_text);
					// 	}
					// }, 500);
				
				mui.back = function() {
					clearInterval(dsq);
				}
				ws = plus.webview.currentWebview();

				function showSide(copy_text) {

					// 防止快速点击可能导致多次创建
					if (wc) {
						return;
					}
					// 开启遮罩
					ws.setStyle({
						mask: 'rgba(0,0,0,0.5)'
					});
					plus.navigator.setStatusBarBackground("#000000");
					// 创建侧滑页面
					wc = createWithoutTitle('copy_edit.html', {
						top: '34%',
						width: '70%',
						height: '24%',
						left: "15%",
						popGesture: 'none',
						titleNView: false
					});
					mui.fire(wc, 'setStyle', {
						copy_text: copy_text
					})
					// 侧滑页面关闭后关闭遮罩
					wc.addEventListener('close', function() {
						ws.setStyle({
							mask: 'none'
						});
						wc = null;
					}, false);
					// 侧滑页面加载后显示（避免白屏）
					wc.addEventListener('loaded', function() {
						wc.show('zoom-fade-out');
					}, false);
				}
			});
			mui.back = function() {
				var _self = plus.webview.currentWebview();
				_self.close("auto");
			}
		</script>
	</body>

</html>
